/******************************************************************************
*	I/O of CC2541
*	by longcd
*
*	release 2018/09/28: output test OK
*******************************************************************************
*/

#include <ioCC2541.h>


//type define
#if 1
typedef unsigned char uint8;
#endif

#include "CC2541_IO.h"


/*	init the I/O
 */
void IO_Init(void)
{
	/*-------------------------------------------------------------------------
	unused I/O is configured as general-purpose I/O input with pullup resistor
	after reset,except P1.0 and P1.1
	-----------------------------------*/

	//P10,P11,P14 as General-purpose I/O
	P1SEL &= ~((1U << 0) | (1U << 1) | (1U << 4));

	//P10,P11,P14 as Output
	P1DIR |= ((1U << 0) | (1U << 1) | (1U << 4));
}

/*	P10 output level
 */
void IO_P10_Out(uint8 level)
{
	P1_0 = level;
}

/*	P11 output level
 */
void IO_P11_Out(uint8 level)
{
	P1_1 = level;
}

/*	P14 output level
 */
void IO_P14_Out(uint8 level)
{
	P1_4 = level;
}


